package com.xuecheng.learning.controller;

import com.xuecheng.api.learning.CourseLearningControllerApi;
import com.xuecheng.framework.domain.learning.response.GetMediaResult;
import com.xuecheng.learning.service.CourseLearningService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ShengJinFeng
 * @version V1.0
 * @ClassName CourseLearningController
 * @Description (这里用一句话描述这个类的作用)
 * @date 2020/3/7 13:22
 * @since V1.0
 */
@RequestMapping("/learning/course")
@Api(value = "录播课程学习管理",description = "录播课程学习管理")
@RestController
public class CourseLearningController implements CourseLearningControllerApi {

    @Autowired
    private CourseLearningService courseLearningService;

    @Override
    @ApiOperation("获取课程学习地址")
    @GetMapping("/getmedia/{courseId}/{teachplanId}")
    public GetMediaResult getmedia(@PathVariable("courseId") String courseId,@PathVariable("teachplanId") String teachplanId) {
        return courseLearningService.getmedia(courseId,teachplanId);
    }
}
